{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# LinearRegression"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "A implementation of Ordinary Least Squares simple and multiple linear regression."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "> from mlxtend.regressor import LinearRegression"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Overview"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Illustration of a simple linear regression model:\n",
    "    \n",
    "![](./LinearRegression_files/simple_regression.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In Ordinary Least Squares (OLS) Linear Regression, our goal is to find the line (or hyperplane) that minimizes the vertical offsets. Or in other words, we define the best-fitting line as the line that minimizes the sum of squared errors (SSE) or mean squared error (MSE) between our target variable (y) and our predicted output over all samples $i$ in our dataset of size $n$.\n",
    "\n",
    "$$SSE =  \\sum_i \\big(\\text{target}^{(i)} - \\text{output}^{(i)}\\big)^2$$\n",
    "\n",
    "$$MSE = \\frac{1}{n} \\times SSE$$\n",
    "\n",
    "\n",
    "Now, `LinearRegression` implements a linear regression model for performing ordinary least squares regression using one of the following three approaches:\n",
    "\n",
    "- Normal Equations\n",
    "- Gradient Descent\n",
    "- Stochastic Gradient Descent\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Normal Equations (closed-form solution)\n",
    "\n",
    "The closed-form solution should be preferred for \"smaller\" datasets where calculating (a \"costly\") matrix inverse is not a concern. For very large datasets, or datasets where the inverse of $[X^T X]$ may not exist (the matrix is non-invertible or singular, e.g., in case of perfect multicollinearity), the gradient descent or stochastic gradient descent approaches are to be preferred.\n",
    "\n",
    "The linear function (linear regression model) is defined as:\n",
    "\n",
    "$$y = w_0x_0 + w_1x_1 + ... + w_mx_m = \\sum_{i=0}^{n} = \\mathbf{w}^T\\mathbf{x}$$\n",
    "\n",
    "where $y$ is the response variable, $\\mathbf{x}$ is an $m$-dimensional sample vector, and $\\mathbf{w}$ is the weight vector (vector of coefficients). Note that $w_0$ represents the y-axis intercept of the model and therefore $x_0=1$.  \n",
    "\n",
    "Using the closed-form solution (normal equation), we compute the weights of the model as follows:\n",
    "\n",
    "$$ \\mathbf{w} = (\\mathbf{X}^T\\mathbf{X})^{-1}\\mathbf{X}^Ty$$"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Gradient Descent (GD)  and Stochastic Gradient Descent (SGD) "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "See [Gradient Descent and Stochastic Gradient Descent](../general_concepts/gradient-optimization.md) and [Deriving the Gradient Descent Rule for Linear Regression and Adaline](../general_concepts/linear-gradient-derivative.md) for details."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Random shuffling is implemented as:\n",
    "\n",
    "- for one or more epochs\n",
    "    - randomly shuffle samples in the training set\n",
    "        - for training sample *i*\n",
    "            - compute gradients and perform weight updates"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### References\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- F. Galton. [Regression towards mediocrity in hereditary stature](http://www.jstor.org/stable/2841583). Journal of the Anthropological Institute of Great Britain and Ireland, pages 246–263, 1886.\n",
    "- A. I. Khuri. [Introduction to linear regression analysis](http://onlinelibrary.wiley.com/doi/10.1111/insr.12020_10/abstract), by Douglas C. Montgomery, Elizabeth A. Peck, G. Geoffrey Vining. International Statistical Review, 81(2):318–319, 2013.\n",
    "- D. S. G. Pollock. [The Classical Linear Regression Model](http://www.le.ac.uk/users/dsgp1/COURSES/MESOMET/ECMETXT/06mesmet.pdf)."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 1 - Closed Form Solution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Intercept: 0.25\n",
      "Slope: 0.81\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAfcAAAFkCAYAAAA9h3LKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAPYQAAD2EBqD+naQAAIABJREFUeJzt3Xl4VdXZ9/HvEnFWpE6tVauVQLFODVqxVqw1r6FYRXys\nNSBWrcVZGnGs8ljtoB0szk8Hax2iaW0dqlVBsXWWqgkOSDQJ1qFOqGAcEQjr/WOlIlSUk5xk5+zz\n/VxXris5OcPtMeSXe++17xVijEiSpPxYIesCJElScRnukiTljOEuSVLOGO6SJOWM4S5JUs4Y7pIk\n5YzhLklSzhjukiTljOEuSVLOGO6SJOVMweEeQtgwhHBlCOG1EMK7IYRHQwiV3VGcJEkq3IqF3DmE\nsDZwH3AHUA28BlQAc4tfmiRJ6oxQyMYxIYSzgR1jjLt0X0mSJKkrCj0svyfwcAjhmhDCKyGExhDC\nod1RmCRJ6pxCO/f3gAicA/wF+DJwHnBYjPHKj7j/OqTD988A84pQryRJ5WIVYFNgSozx9UIeWGi4\nvw88GGPc+UO3nQdsF2Pc6SPuPxq4qpCCJEnSEsbEGK8u5AEFLagDXgKalrqtCdhnGfd/BqCuro7B\ngwcX+FL5U1tby6RJk7IuI3O+D4v5XiS+D4v5XiS+D9DU1MQBBxwAHVlaiELD/T5g0FK3DQKeXcb9\n5wEMHjyYykqvluvXr5/vA74PH+Z7kfg+LOZ7kfg+LKHg09qFLqibBAwNIZwSQti847D7ocCFhb6w\nJEnqHgWFe4zxYWAUUAM8DpwKjI8x/rEbapMkSZ1Q6GF5Yoy3ALd0Qy2SJKkInC3fg2pqarIuoVfw\nfVjM9yLxfVjM9yLxfeiagi6FK/jJ08z5hoaGBhdGSJJUgMbGRo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QL6AZcX8qDOTKiTuupiYAtgp6wLyciTwDakf7D7AleEEIaVU8CHEDYi/YFXFWNckHU9WYoxfnhu\n+IwQwoPAs8B+QLmdqlkBeDDGOLHj60dDCFuS/ui5MruyMnUIcGuM8aP2b1mm7urcC91gRmUihHAh\nMAL4WozxpazryUKMcWGM8ekY4/QY46mkhWTjs66rhw0B1gMaQwgLQggLgF2A8SGE+R1Hd8pSjLEN\naAYGZF1LBl4Clt4jvAnYJINaMhdC2IS0APl3hT62W8K94y/xBmC3/9zW8Y91N+D+7nhN9X4dwT4S\n2DXG+FzW9fQiKwArZ11ED5sKbEU6LL9Nx8fDQB2wTSzj0ZkdiwwHkIKu3NwHDFrqtkGkIxnl6BDS\n6exbCn1gdx6Wd4MZoOO82QDgP53I50MI2wBzYozPZ1dZzwohXAzUAHsB74QQ/nNUpy3GWDbbAYcQ\nfgrcStpJcU3SQpldSOcXy0aM8R1gifUWIYR3gNdjjEt3brkWQvgFcBMpwD4LnAEsAOqzrCsjk4D7\nQginkC772gE4FPheplVloKMhPgi4LMa4qNDHd1u4u8HMB7YD/kFaGR5J1/5DWhxxSFZFZeBw0n//\nnUvdfjBwRY9Xk531Sf/vPwO0AY8Bu7taHCjfORAbAVcD6wCvAvcCQ2OMr2daVQZijA+HEEYBZ5Mu\njfwXMD7G+MdsK8tEFbAxnVx34cYxkiTljLPlJUnKGcNdkqScMdwlScoZw12SpJwx3CVJyhnDXZKk\nnDHcJUnKGcNdkqScMdwlScoZw12SpJwx3CVJypn/Dw4reuLXj4wNAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x105e70588>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "from mlxtend.regressor import LinearRegression\n",
    "\n",
    "X = np.array([ 1.0, 2.1, 3.6, 4.2, 6])[:, np.newaxis]\n",
    "y = np.array([ 1.0, 2.0, 3.0, 4.0, 5.0])\n",
    "\n",
    "ne_lr = LinearRegression(minibatches=None)\n",
    "ne_lr.fit(X, y)\n",
    "\n",
    "print('Intercept: %.2f' % ne_lr.b_)\n",
    "print('Slope: %.2f' % ne_lr.w_[0])\n",
    "\n",
    "def lin_regplot(X, y, model):\n",
    "    plt.scatter(X, y, c='blue')\n",
    "    plt.plot(X, model.predict(X), color='red')    \n",
    "    return\n",
    "\n",
    "lin_regplot(X, y, ne_lr)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 2 - Gradient Descent"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Iteration: 100/100 | Cost 0.08 | Elapsed: 0:00:00 | ETA: 0:00:00"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Intercept: 0.82\n",
      "Slope: 0.22\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAfcAAAFkCAYAAAA9h3LKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAPYQAAD2EBqD+naQAAIABJREFUeJzt3Xd4V+X9//HnDVJ3EUcdVdsqgR+4iVqssxoFUdtSRw2j\nRYsCggzFIu7RqrV111FbNzXVuq0Mi1b9ogWVqICgCdhK3QqIigMI9++POw4oKp+sk8/J83Fdua7k\n8Blvj0leeZ9zjxBjRJIk5UerrAuQJEkNy3CXJClnDHdJknLGcJckKWcMd0mScsZwlyQpZwx3SZJy\nxnCXJClnDHdJknLGcJckKWcKDvcQwmYhhFtCCO+EED4MITwXQujSGMVJkqTCrVbIg0MI6wGPAw8B\n3YB3gBJgQcOXJkmS6iIUsnFMCOECYLcY496NV5IkSaqPQi/LHwI8HUK4PYTwZgihMoTQvzEKkyRJ\ndVNo5/4REIGLgDuAXYHLgAExxltW8vgNSJfv/wN83AD1SpLUUqwBfBeYEGOcV8gTCw33T4AnY4x7\n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nA2\nsASoyLKujFwCPB5CGE2a9vV9oD9wTKZVZaC2Ie4H3BhjXFbo8xst3N1g5jM7A/8kjQyPpLn/kAZH\nHJ1VURkYSPrvf2SF40cBNzd5Ndn5Fun//abAQmAacICjxYGWuw7E5sCtwAbA28AkoGuMcV6mVWUg\nxvh0CKEncAFpauS/gWExxr9mW1kmyoAtqOO4CzeOkSQpZ1xbXpKknDHcJUnKGcNdkqScMdwlScoZ\nw12SpJwx3CVJyhnDXZKknDHcJUnKGcNdkqScMdwlScoZw12SpJz5/4VLaJPfiTa/AAAAAElFTkSu\nQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x105e66198>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "from mlxtend.regressor import LinearRegression\n",
    "\n",
    "X = np.array([ 1.0, 2.1, 3.6, 4.2, 6])[:, np.newaxis]\n",
    "y = np.array([ 1.0, 2.0, 3.0, 4.0, 5.0])\n",
    "\n",
    "gd_lr = LinearRegression(eta=0.005, \n",
    "                         epochs=100,\n",
    "                         minibatches=1,\n",
    "                         random_seed=123,\n",
    "                         print_progress=3)\n",
    "gd_lr.fit(X, y)\n",
    "\n",
    "print('Intercept: %.2f' % gd_lr.w_)\n",
    "print('Slope: %.2f' % gd_lr.b_)\n",
    "\n",
    "def lin_regplot(X, y, model):\n",
    "    plt.scatter(X, y, c='blue')\n",
    "    plt.plot(X, model.predict(X), color='red')    \n",
    "    return\n",
    "\n",
    "lin_regplot(X, y, gd_lr)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAk4AAAGGCAYAAACNCg6xAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAPYQAAD2EBqD+naQAAIABJREFUeJzt3X2YXWV57/HvDQyQKDOUBpNDi0VK5KXVSFKq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zZnsat8KvBc4jOrQ3/8DhifwPiX1Eb9VJ6nv1N94e1lmfq7t\nWiRNL57jJEmS1JDBSVI/cqpcUis8VCdJktSQM06SJEkNGZwkSZIaMjhJkiQ1ZHCSJElqyOAkSZLU\nkMFJkiSpIYOTJElSQwYnSZKkhgxOkiRJDf1/9YCmkE49IDYAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x105e669e8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Visualizing the cost to check for convergence and plotting the linear model:\n",
    "\n",
    "plt.plot(range(1, gd_lr.epochs+1), gd_lr.cost_)\n",
    "plt.xlabel('Epochs')\n",
    "plt.ylabel('Cost')\n",
    "plt.ylim([0, 0.2])\n",
    "plt.tight_layout()\n",
    "plt.show()    "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 3 - Stochastic Gradient Descent"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Intercept: 0.24\n",
      "Slope: 0.82\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAfcAAAFkCAYAAAA9h3LKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAPYQAAD2EBqD+naQAAIABJREFUeJzt3Xl0VeW9//H3I3VWKPXWoWq9XglcUJc10YpXkWtNQXEq\n1qsGpFpFBSekDpU619r6q7XW2mqdllZT49RaqwWxaJ2oqBBURGgSrEqdBQkWRCE8vz+eVAVROclJ\nds4+79daWSabM3zdkHzy3fsZQowRSZKUH2tkXYAkSSouw12SpJwx3CVJyhnDXZKknDHcJUnKGcNd\nkqScMdwlScoZw12SpJwx3CVJyhnDXZKknCk43EMIXwkh3BxCeDuEsDiE8EwIobIjipMkSYX7QiEP\nDiF8EZgMPAAMBt4GKoB3il+aJElqi1DIxjEhhIuBXWOMAzuuJEmS1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sUYV+7cci2EcAlwDynANgcuAJYCdVnWlZHLgMkhhHGkaV+7ACOBYzKtKgOtDfGR\nwI0xxuWFPr/Dwt0NZj60E/BX0sjwSJr7D2lwxFFZFZWBUaT//4dWOv5d4KZOryY7G5P+7jcDmoFn\ngUGOFgfKdx2ILYBbgI2At4DHgP4xxnmZVpWBGOPUEMJQ4GLS1Mh/AGNijLdmW1kmqoEtaeO4CzeO\nkSQpZ1xbXpKknDHcJUnKGcNdkqScMdwlScoZw12SpJwx3CVJyhnDXZKknDHcJUnKGcNdkqScMdwl\nScoZw12SpJz5/7mTdL4Po2m9AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x10c7ea390>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "from mlxtend.regressor import LinearRegression\n",
    "\n",
    "X = np.array([ 1.0, 2.1, 3.6, 4.2, 6])[:, np.newaxis]\n",
    "y = np.array([ 1.0, 2.0, 3.0, 4.0, 5.0])\n",
    "\n",
    "sgd_lr = LinearRegression(eta=0.01, \n",
    "                          epochs=100, \n",
    "                          random_seed=0, \n",
    "                          minibatches=len(y))\n",
    "sgd_lr.fit(X, y)\n",
    "\n",
    "print('Intercept: %.2f' % sgd_lr.b_)\n",
    "print('Slope: %.2f' % sgd_lr.w_)\n",
    "\n",
    "def lin_regplot(X, y, model):\n",
    "    plt.scatter(X, y, c='blue')\n",
    "    plt.plot(X, model.predict(X), color='red')    \n",
    "    return\n",
    "\n",
    "lin_regplot(X, y, sgd_lr)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAk4AAAGGCAYAAACNCg6xAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAPYQAAD2EBqD+naQAAIABJREFUeJzt3XmYHFW9//H3N9tAwACSM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3f2pTSE5W/3xQRM4Hr\nyddDHQScXPnsQuDzwI8i4gvk02vnAD9OKVUv4P488J2IWEi+9cEo4NCU0reKFK4y3ZnAncBWwGuB\nu/o6k5I2LwYnSa3qNcCj3frNAfap/H0a8Bbg28BjwFtSSncDpJRWRMRk4GzgFmA5cDHw/6oTSin9\nOCLayC1FXyP/R9zFNd/V03/OpJr+q4GvABPIp/6uA6b0Yz4lbUb8rzpJm53Kf7z9R0rpN80ui6Qt\ni9c4SZIkFWRwkrQ5sqlcUlN4qk6SJKkgW5wkSZIKMjhJkiQVZHCSJEkqyOAkSZJUkMFJkiSpIIOT\nJElSQQYnSZKkggxOkiRJBRmcJEmSCvr/YSwKaCdrwd8AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x10c909748>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(range(1, sgd_lr.epochs+1), sgd_lr.cost_)\n",
    "plt.xlabel('Epochs')\n",
    "plt.ylabel('Cost')\n",
    "plt.ylim([0, 0.2])\n",
    "plt.tight_layout()\n",
    "plt.show()  "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 3 - Stochastic Gradient Descent with Minibatches"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Intercept: 0.24\n",
      "Slope: 0.82\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAfcAAAFkCAYAAAA9h3LKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAPYQAAD2EBqD+naQAAIABJREFUeJzt3XmcXvPd//HXNxE7kba0Wty920xy2x7IWIIKaioRDU1R\nnSwaJBG7qTXaUu5bqZbU0lS1ahuGUvwokoq1QYRMhUiYmRRB7Ymxk0y+vz++U5E0ItfMNXPmOtfr\n+XjMozNnruXjNDPv+ZzzXUKMEUm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SZflt2r9eAyoBbaKZbx0Zusgw96koCs3DwJ9\nlznWl3QloxwdQrqdfUehT+zIy/JuMAO03jfrDfy7E/lGCGErYH6M8YXsKutcIYSJQDWwD/BeCOHf\nV3WaY4xlsx1wCOEXwJ2knRTXIQ2U2ZV0f7FsxBjfA5YabxFCeA94M8a4bOeWayGEXwG3kQLsa8AZ\nwEKgLsu6MjIBeDCEMJ407WsHYDQwJtOqMtDaEI8CrogxLi70+R0W7m4w84ltgXtJI8Mjae4/pMER\nh2RVVAbGkf7771vm+MHAVZ1eTXY2IP1/vyHQDDwB7OlocaB814HYCLgW+CLwOjAV6B9jfDPTqjIQ\nY3wshDAUOIc0NfJZ4NgY43XZVpaJKmBj2jjuwo1jJEnKGdeWlyQpZwx3SZJyxnCXJClnDHdJknLG\ncJckKWcMd0mScsZwlyQpZwx3SZJyxnCXJClnDHdJknLGcJckKWf+P1M+eDq5SfFoAAAAAElFTkSu\nQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x10c751048>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "from mlxtend.regressor import LinearRegression\n",
    "\n",
    "X = np.array([ 1.0, 2.1, 3.6, 4.2, 6])[:, np.newaxis]\n",
    "y = np.array([ 1.0, 2.0, 3.0, 4.0, 5.0])\n",
    "\n",
    "sgd_lr = LinearRegression(eta=0.01, \n",
    "                          epochs=100, \n",
    "                          random_seed=0, \n",
    "                          minibatches=3)\n",
    "sgd_lr.fit(X, y)\n",
    "\n",
    "print('Intercept: %.2f' % sgd_lr.b_)\n",
    "print('Slope: %.2f' % sgd_lr.w_)\n",
    "\n",
    "def lin_regplot(X, y, model):\n",
    "    plt.scatter(X, y, c='blue')\n",
    "    plt.plot(X, model.predict(X), color='red')    \n",
    "    return\n",
    "\n",
    "lin_regplot(X, y, sgd_lr)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,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1mCV377FMC7I9/3P20FizI/NKXMseOLRu8MWNKXR1/fObj\nj6867PPPZ/7855l77lnKfcghLwy2zz+fuccemZttVgJcPT3wQOYll2T+6Efl7yWXlGW7+uryo1TV\n3/9e6vUlLykB9GMfK3XXKP/8Z/khveSSF35uO7rllrLud9wx81e/Wv0029rK+v/lL8uy/sd/lOUd\nPjxz881LUN9jj/I9/MpXug/p3fnHPzJPPDHzne8s419/fc+nsSaLFmWec07mWWdlLl5c32n3p8ce\nK9upuXPL/0uWlO5tbyvr/xe/eOE48+ZlvvGN5ft69tkrv8e99cADZfsyYkTmBReseXoPPZT5ildk\nvvjFJSz01F13lfE32ijzqqtKvzvuyNxww8x9933htjOzLPMhh5RtyX/91wuHOemksi2aNavn5emr\nFSvK53rIkMwtt8z885/7Ps0bbyzfu6OOyly4sO/TyzQ4NVVwWr488/LLMy+6KPN738s8//wSLs46\nK/NTn8o87LDyA7D99pkve1kJQo899sLpzJ1bNiZQWnu23LL8v9FGmf/5n6XV6IwzMk84oQSTXXYp\ne05QNlCve12Z3wc+UPqdcMILv5xPPlkCxtChpRxf+ELmu95VNgIRZbyvfrXrlq22thL+IsqPyOjR\nJXhceunK4dvaSmvQFluUH+l3vauUcciQUubf/KZaq1xnV15ZynbEEWVahx32wo3jc8+t3OP85CfL\nBvQ73ynd+eeX9TFyZCnXMceUlqbFizO/9rWywdtww7Lx+OtfM7/4xfLDC5m7777qMnb22GNleXfb\nrVqgWb68+x/d554rYW2ffVbWR1fdxhtnHnlk5vTpL6zjtrYSVq+6KnP//cv6GjmybMA+97mynCNG\nlM/K/PlrLm932toyn3gi81//ynzwwbI+77ijbHRnzCiB/rrrSgvkd79b6mb8+FWXY8yYzM9+tgST\ndvfdVwIOlBa+PfYo/++/f2kx6Gjhwszzzlu5YwHlc7n33uWH6JxzMk85pQTjgw7KfMtbSv2PHVvC\n/HPPrX4ZH3qo7OCsu275Hu6xR2nZhLJed965fK5uuKHrH8sqnnkm8+tfL+F76NDy4/myl63+M9ed\nefPKej///PJd3XvvzF13zXztazNf//qyfXnzm8tn4Zprui/zihWlLu+8s/sy3HVX+T4OH/7Cz+eQ\nIWVHcPr07su6bFmpF8icODHzppt6tqztbrihfI622irz9turj/foo+VzM3p05l/+Um2cJUvKNn7k\nyDJux1bwzLJOhw0rO8jt623FivL5Hz06c9SosiPUlWXLyudphx1Wv0NRb088UVrOoLSgv/rVpU4v\nuKB301uyJPMTnyjbr1e9qmz/t9xyZYNAXxicmig41dOKFZnf/nbZkBx3XPmwrW7jvnx55q23lh+I\n97637EENH142nN15/vnMKVPKp2Ts2BLqPvax8uW+4441l+/QQ8u4733vC1tp2j37bOZnPlP2OE4+\nubR69NU731nm+/73d79H2dZWwsHQoSs34hErW5e6C63z5mV+5CNlo9fesnf00WXdVnHzzWW9v/vd\npRXwjDNKcD777BLMjjmmNM3/27+tnMdmm5UfsyOOKGH1M58p9QeZr3lN2UA/+WQJd4sWlXX67LPl\nx+Gzny3Tag8fb397CXjjx5dQ1L7su+xSAkLHPb4FC8q8Ro4sIeCoo8qG7nOfK62Kp5+e+c1vlkO2\nl19egs+NN5bP4tlnZ37wg+WHuD1AVOmGDCmf6RNOKId2//nPEpA+8pGyYR02LHPy5LKehg0rQfTC\nC0s9t7WVcV7yktJSe+qpZX0fdVRZhqFDy2fjpz8tQWdNYePBB8uOSEQ5tPzzn5dxnnuuBLhbby3L\nfNRRpUVkk01KK+VTT5Xxly8vgeKCC0p43WKLlYHtiCNKyF+woPsQvXRp+dG+994y3dGjy3yOProE\nwzlzSkiE8vn4y19K+ebMKfM87LDSAjtsWFn2oUPL+u0YtIcMKTtD++9f6uuII8p4hxxSvrftAXbT\nTcuP/A03ZN52W+Y3vlF2djbZZOW0xo4t4114YebDD5fWtv32K++95CXl83LLLaX/FVeUluRzzy3T\nq2LGjPLZaN8xav9+LllSDmH993+X79UBB5Qdm+nTS+BvayvbvaFDSyDuzU7AggXlu7bhhiVwdqWt\nrdTBsceW8AzlFIHuTqv43vfKMKefXranr3t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bRevZ9f+nw3sHBHrd3j/9cAK4N7MfBZ4EHhLXwqQmQsy84eZ\neRgwBTi6L9OTNPjZ4iRpsFo3IsZ26rc8MxfU/j8wImYCN1LOh9oVOLL23iXAKcAPIuKLlMNr5wAX\nZ2b7CdynAN+KiHmUWx9sCOyemedWKVxtujOBu4H1gLcD9/R0ISWtXQxOkgartwL/7NRvDrB97f+T\ngYOA84B/AQdl5r0AmbkkIvYBzgZuARYDlwP/1T6hzLw4ItaltBT9N+WKuMs7zKurK2eyQ//ngK8A\nL6cc+vsDMLkXyylpLeJVdZLWOrUr3t6Zmb9sdFkktRbPcZIkSarI4CRpbWRTuaSG8FCdJElSRbY4\nSZIkVWRwkiRJqsjgJEmSVJHBSZIkqSKDkyRJUkUGJ0mSpIoMTpIkSRUZnCRJkioyOEmSJFX0/wHZ\n6qOUbgP8qgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x10cb9ee48>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(range(1, sgd_lr.epochs+1), sgd_lr.cost_)\n",
    "plt.xlabel('Epochs')\n",
    "plt.ylabel('Cost')\n",
    "plt.ylim([0, 0.2])\n",
    "plt.tight_layout()\n",
    "plt.show()  "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## API"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "## LinearRegression\n",
      "\n",
      "*LinearRegression(eta=0.01, epochs=50, minibatches=None, random_seed=None, print_progress=0)*\n",
      "\n",
      "Ordinary least squares linear regression.\n",
      "\n",
      "**Parameters**\n",
      "\n",
      "- `eta` : float (default: 0.01)\n",
      "\n",
      "    solver rate (between 0.0 and 1.0)\n",
      "\n",
      "- `epochs` : int (default: 50)\n",
      "\n",
      "    Passes over the training dataset.\n",
      "    Prior to each epoch, the dataset is shuffled\n",
      "    if `minibatches > 1` to prevent cycles in stochastic gradient descent.\n",
      "\n",
      "- `minibatches` : int (default: None)\n",
      "\n",
      "    The number of minibatches for gradient-based optimization.\n",
      "    If None: Normal Equations (closed-form solution)\n",
      "    If 1: Gradient Descent learning\n",
      "    If len(y): Stochastic Gradient Descent learning\n",
      "    If 1 < minibatches < len(y): Minibatch learning\n",
      "\n",
      "- `random_seed` : int (default: None)\n",
      "\n",
      "    Set random state for shuffling and initializing the weights.\n",
      "\n",
      "- `print_progress` : int (default: 0)\n",
      "\n",
      "    Prints progress in fitting to stderr if not solver='normal equation'\n",
      "    0: No output\n",
      "    1: Epochs elapsed and cost\n",
      "    2: 1 plus time elapsed\n",
      "    3: 2 plus estimated time until completion\n",
      "\n",
      "**Attributes**\n",
      "\n",
      "- `w_` : 2d-array, shape={n_features, 1}\n",
      "\n",
      "    Model weights after fitting.\n",
      "\n",
      "- `b_` : 1d-array, shape={1,}\n",
      "\n",
      "    Bias unit after fitting.\n",
      "\n",
      "- `cost_` : list\n",
      "\n",
      "    Sum of squared errors after each epoch;\n",
      "    ignored if solver='normal equation'\n",
      "\n",
      "**Examples**\n",
      "\n",
      "For usage examples, please see\n",
      "    [http://rasbt.github.io/mlxtend/user_guide/regressor/LinearRegression/](http://rasbt.github.io/mlxtend/user_guide/regressor/LinearRegression/)\n",
      "\n",
      "### Methods\n",
      "\n",
      "<hr>\n",
      "\n",
      "*fit(X, y, init_params=True)*\n",
      "\n",
      "Learn model from training data.\n",
      "\n",
      "**Parameters**\n",
      "\n",
      "- `X` : {array-like, sparse matrix}, shape = [n_samples, n_features]\n",
      "\n",
      "    Training vectors, where n_samples is the number of samples and\n",
      "    n_features is the number of features.\n",
      "\n",
      "- `y` : array-like, shape = [n_samples]\n",
      "\n",
      "    Target values.\n",
      "\n",
      "- `init_params` : bool (default: True)\n",
      "\n",
      "    Re-initializes model parameters prior to fitting.\n",
      "    Set False to continue training with weights from\n",
      "    a previous model fitting.\n",
      "\n",
      "**Returns**\n",
      "\n",
      "- `self` : object\n",
      "\n",
      "\n",
      "<hr>\n",
      "\n",
      "*predict(X)*\n",
      "\n",
      "Predict targets from X.\n",
      "\n",
      "**Parameters**\n",
      "\n",
      "- `X` : {array-like, sparse matrix}, shape = [n_samples, n_features]\n",
      "\n",
      "    Training vectors, where n_samples is the number of samples and\n",
      "    n_features is the number of features.\n",
      "\n",
      "**Returns**\n",
      "\n",
      "- `target_values` : array-like, shape = [n_samples]\n",
      "\n",
      "    Predicted target values.\n",
      "\n",
      "\n"
     ]
    }
   ],
   "source": [
    "with open('../../api_modules/mlxtend.regressor/LinearRegression.md', 'r') as f:\n",
    "    print(f.read())"
   ]
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  },
  "toc": {
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
